
<div class="widget-box">             
    <div class="widget-title">
		<span class="icon">
			<i class="glyphicon <?php echo ((@$header_icon !='')?$header_icon:'glyphicon-th'); ?>"></i>
		</span>
		<h5><?php echo $header_title; ?></h5>
		<div class="buttons alert-danger">
			<a id="add-event" href="<?php echo $this->url_edit; ?>" data-original-title="Thêm mới" class="btn tip-top"><i class="glyphicon glyphicon-plus"></i> <span class="text">Thêm mới</span></a>
		</div>
	</div>            

        <div class="widget-content nopadding">
            <table cellpadding="0" cellspacing="0" width="100%" class="<?php echo (isset($tableClass) && $tableClass!='')?$tableClass:'table table-bordered table-striped table-hover'?>">
                <thead>
                    <tr>   
                        <?php
                        foreach ($header_table as $k=>$v)
						{
                            echo '<th '.$v.'>' . $k . '</th>';
						}
                        echo '<th style="width: 155px;">Hoạt động</th>';
                        ?>                                    
                    </tr>
                </thead>
                <tbody>
                    <?php
                    $col_span = 1;
                    if(isset($datas)){
                        $col_span = @count($datas[0]);
                        foreach ($datas as $keys => $vals) {
                            foreach ($vals as $key => $val)
                                echo '<td>' . $val . '</td>';
                            echo '<td>';
                            echo '<a href="' . $this->url_edit . @$vals['id'] . '" class="btn btn-primary btn-mini tip-top" data-original-title="Edit">Sửa</a>';
    						echo ' <a href="#delete" class="btn btn-danger btn-mini delete tip-top" data-toggle="modal" onclick="_deletePost(this);" rel_url="'.$this->url_delete.@$vals['id'].'" data-original-title="Delete">Xóa</a>';
                            echo '</td>';
    						echo '</tr>';
                        }
                    }
                    ?>
					
					<tr>
                        <td colspan="<?php echo @($col_span+1);?>"><?php 
                        echo @$this->pagination->create_links(); ?></td>
                    </tr>
                </tbody>
                 
            </table>
        </div>
</div>
